<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <script src="./js/jquery.min.js"></script>
    <title></title>
</head>
<body>
<form id="uploadForm" enctype="multipart/form-data">
    文件:<input id="file" type="file" name="file"/>
</form>
<button id="upload">上传文件</button>
</body>
<script type="text/javascript">
    $(function () {
        $("#upload").click(function () {
            var formData = new FormData($('#uploadForm')[0]);
            $.ajax({
                type: 'post',
                url: "http://wycapi.gzjt.gov.cn/api/app/common/binapi",
                data: formData,
                cache: false,
                processData: false,
                contentType: false,
                headers: {
		            "binfile-md5":"7f458c0045b4825debd6277b05fba9b8",
		            "Access-Control-Allow-Headers":"X-Requested-With"
		        },
                success:function(data){
                 	console.log(data);
                },               
	            error:function () {
	                alert("上传失败");
	            }
            });
        });
    });
</script>
</html>
